package com.xianrenit.xianrenpuzi.model.entity.product;

import com.xianrenit.xianrenpuzi.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class Category extends BaseEntity implements Serializable {
    private String name;
    private String imageUrl;
    private Long parentId;
    private Integer status;
    private Integer orderNum;
    @TableField(exist = false) //该字段不是数据库表的字段
    @Schema(description = "扩展属性：是否有下一级分类")
    private Boolean hasChildren;
    @TableField(exist = false)
    private List<Category> children;
}
